using System.Reflection;
using AspectCore.Configuration;

namespace Vin.Extension.Aop;

public static class VinAopExtension
{
    public static AspectPredicate? EnableParameterAspectFilter;

    // internal const string InstanceKey = "_implementation";
    //
    // public static T? GetAopProxy<T>(this object? obj) where T : class
    // {
    //     if (obj == null)
    //     {
    //         return null;
    //     }
    //
    //     var instance = obj.GetType().GetField(InstanceKey,
    //         BindingFlags.Default | BindingFlags.NonPublic | BindingFlags.Instance)?.GetValue(obj);
    //
    //     return instance as T;
    // }
}